<template>
  <a-card :bordered="false">
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目档案编号">
              <j-input placeholder="请输入项目档案编号" v-model="queryParam.projectFinalNo"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目名称">
              <j-input placeholder="请输入项目名称" v-model="queryParam.projectName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="立项日期" >
              <a-range-picker
                format="YYYY-MM-DD"
                :placeholder="['开始时间', '结束时间']"
                v-model="projectEstablishDateRange"
                @change="(dates, dateStrs) => { queryParam.projectEstablishDate_begin = dateStrs[0]; queryParam.projectEstablishDate_end = dateStrs[1] }"
                style="width: 100%"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24" >
            <a-form-item label="业绩归属年度" >
              <j-dict-select-tag type="list" v-model="queryParam.year" dictCode="yjgsnd" placeholder="请选择业绩归属年度"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="业主单位">
              <j-input placeholder="请输入业主单位" v-model="queryParam.ownerUnitName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="经营团队">
              <select-team-input v-model="queryParam.teamId" :tdlx="3" :teamType="0" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目负责人">
              <j-input placeholder="请输入项目负责人" v-model="queryParam.projectLeadingName"></j-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset()" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button type="primary" icon="download" @click="handleExportXls('项目合同任务款项一览表')">导出</a-button>
      <a-popover title="自定义列" trigger="click" placement="leftBottom">
        <template slot="content">
          <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
            <a-row>
              <template v-for="(item,index) in defColumns">
                <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
                  <a-col :span="12" :key="index"><a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox></a-col>
                </template>
              </template>
            </a-row>
          </a-checkbox-group>
        </template>
        <a style="float: right;"><a-icon type="setting" :style='iconStyle'/></a>
      </a-popover>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:scrollX}"
        :components="draggableComponent"
        bordered
        rowKey="id"
        :pagination="false"
        :columns="columns"
        :data-source="dataSource"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        @change="tableChangePages"
      >
      </a-table>
    </div>

    <div style="padding: 10px; display: flex; justify-content: flex-end;" v-if="rowSpanPagination.totalPage">
      <Pagination :total-page="rowSpanPagination.totalPage" :current-page="rowSpanPagination.pageNo" :total="rowSpanPagination.total" @page-change="handlePageChange" />
    </div>
    <!-- 项目详情开始 -->
    <erp-project-report-modal  ref="reportForm"></erp-project-report-modal>
    <erp-project-finance-reimbursement-list ref="reimburForm" ></erp-project-finance-reimbursement-list>
  </a-card>
</template>

<script>
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin';
import { JeecgBpmListMixin } from '@/mixins/JeecgBpmListMixin';
import { mixinDevice } from '@/utils/mixin'
import BusinessCategoryNameSelect from '@views/erp/components/BusinessCategoryNameSelect'
import SelectTeamInput from '@/views/scy/components/SelectTeamInput'
import SelectCompanyInput from '@/views/scy/components/SelectCompanyInput'
import { getAction } from '@/api/manage';
import ErpProjectFinanceReimbursementList from '../project/modules/ErpProjectFinanceReimbursementList'
import ErpProjectReportModal from '@/views/erp/report/project/modules/ErpProjectReportModal'
import Pagination from '../audit/Pagination'
export default {
  name: 'ErpProjectContractProductReportList',
  mixins: [JeecgBpmListMixin, mixinDevice, DisabledAuthFilterMixin],
  components: {
    ErpProjectReportModal,
    BusinessCategoryNameSelect,
    SelectCompanyInput,
    SelectTeamInput,
    ErpProjectFinanceReimbursementList,
    Pagination
  },
  data() {
    return {
      projectEstablishDateRange: [],
      rowSpanPagination: {
        pageNo: 1,
        pageSize: 5,
        totalPage: 0,
        total: 0
      },
      //列设置
      settingColumns:[],
      columns:[],
      defColumns: [
        { title: '项目档案编号',
          dataIndex: 'projectFinalNo',
          align: 'center',
          ellipsis: true,
          width: 200,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '项目名称',
          dataIndex: 'projectName',
          align: 'center',
          width: 250,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={()=>this.onDetail(row.id)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '立项日期',
          dataIndex: 'projectEstablishDate',
          align: 'center',
          width: 150,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '业绩归属年度',
          dataIndex: 'year',
          align: 'center',
          width: 150,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '经营团队',
          dataIndex: 'teamName',
          align: 'center',
          width: 200,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '项目承接人',
          dataIndex: 'undertakerName',
          align: 'center',
          width: 100,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '预计合同额(元)',
          dataIndex: 'estimatedContractAmount',
          align: 'center',
          width: 120,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '业主单位',
          dataIndex: 'ownerUnitName',
          align: 'center',
          width: 250,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        { title: '签订单位',
          dataIndex: 'signUnitName',
          align: 'center',
          width: 250,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        {
          title: '项目所在省份',
          align: 'center',
          dataIndex: 'projectProvince',
          key: 'projectProvince',
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
          width: 120
        },
        {
          title: '项目所在地市',
          align: 'center',
          dataIndex: 'projectCity',
          key: 'projectCity',
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
          ellipsis: true,
          width: 120
        },
        {
          title: '已回款总额(元)',
          align: 'center',
          dataIndex: 'realCollectionContractAmountMoney',
          ellipsis: true,
          width: 120,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '回款率(%)',
          align: 'center',
          dataIndex: 'collectScale',
          ellipsis: true,
          width: 120,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '未回款(元)',
          align: 'center',
          dataIndex: 'unCollectMoney',
          ellipsis: true,
          width: 120,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '项目状态',
          align: 'center',
          dataIndex: 'changeStatus_dictText',
          ellipsis: true,
          width: 100,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '项目归档状态',
          align: 'center',
          dataIndex: 'projectFileStatus_dictText',
          ellipsis: true,
          width: 120,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '合同状态',
          align: 'center',
          dataIndex: 'contractStatus_dictText',
          ellipsis: true,
          width: 100,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '收款合同名称',
          align: 'center',
          dataIndex: 'contractName',
          ellipsis: true,
          width: 200,
          customRender: (value, row, index) => {
            const obj = {
              children: (<a onClick={() => this.getContractDetail(row)}>{value}</a>),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          }
        },
        {
          title: '合同编号',
          align: 'center',
          dataIndex: 'contractNo',
          ellipsis: true,
          width: 200,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '收款签订金额(元)',
          align: 'center',
          dataIndex: 'collectContractAmountMoney',
          ellipsis: true,
          width: 150,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getContractDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        
        {
          title: '付款合同累计签订金额(元)',
          align: 'center',
          dataIndex: 'payContractAmountMoney',
          width: 200,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getContractDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '付款合同已付款总额(元)',
          align: 'center',
          dataIndex: 'realPayContractAmountMoney',
          width: 200,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getContractDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '差旅报销总额(元)',
          align: 'center',
          dataIndex: 'travelReimbursementAmount',
          ellipsis: true,
          width: 150,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getReimbursementDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '自驾累计公里数油补(元)',
          align: 'center',
          dataIndex: 'driveReimbursementAmount',
          width: 200,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getReimbursementDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '费用报销总额(元)',
          align: 'center',
          dataIndex: 'expenseReimbursementAmount',
          ellipsis: true,
          width: 150,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getReimbursementDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '工程进度款支付总额(元)',
          align: 'center',
          dataIndex: 'projectProgressPaymentAmount',
          width: 200,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getReimbursementDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '提取绩效总额(元)',
          align: 'center',
          dataIndex: 'achievementsExtractionAmount',
          ellipsis: true,
          width: 150,
          customRender: (value, row, index) => {
            const obj = {
              children: (
                <a onClick={() => this.getReimbursementDetail(row)}>{value}</a>
              ),
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },
        {
          title: '合同存档份数',
          align: 'center',
          dataIndex: 'contractNum',
          width: 120,
          ellipsis: true,
          customRender: (value, row, index) => {
            const obj = {
              children: value,
              attrs: {}
            };
            const obj1 = this.customRow(row, index);
            obj.attrs.rowSpan = obj1.rowspan
            return obj;
          },
        },

        {
          title: '任务明细',
          dataIndex:"task",
          children: [
            { title: '任务编码',
              dataIndex: 'billNo',
              align: 'center',
              ellipsis: true,
              width: 200,
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '业务分类',
              dataIndex: 'categoryName',
              align: 'center',
              ellipsis: true,
              width: 200,
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '项目负责人',
              dataIndex: 'projectLeadingName',
              align: 'center',
              width: 100,
              ellipsis: true,
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '匹配合同额(元)',
              align: 'center',
              dataIndex: 'newContractAmount',
              width: 120,
              ellipsis: true,
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '生产团队',
              align: 'center',
              ellipsis: true,
              width: 200,
              dataIndex: 'productTeamName',
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '任务进度',
              align: 'center',
              ellipsis: true,
              width: 120,
              dataIndex: 'taskProgress',
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '进度百分比(%)',
              align: 'center',
              ellipsis: true,
              width: 120,
              dataIndex: 'contractRate',
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
            { title: '已完成进度',
              align: 'center',
              ellipsis: true,
              width: 120,
              dataIndex: '',
              customRender: (value, row, index) => {
                const obj = {
                  children: value,
                  attrs: {}
                };
                const obj1 = this.customTaskRow(row, index);
                obj.attrs.rowSpan = obj1.rowspan
                return obj;
              }
            },
          ]
        },
        {
          title: '款项明细',
          dataIndex:"amount",
          children: [
            { title: '款项名称',
              align: 'center',
              ellipsis: true,
              width: 200,
              dataIndex: 'nodeName'
            },
            { title: '回款金额(元)',
              align: 'center',
              ellipsis: true,
              width: 120,
              dataIndex: 'collectionAmount'
            },
            { title: '回款日期',
              align: 'center',
              ellipsis: true,
              width: 150,
              dataIndex: 'collectionDate'
            },
            { title: '来款单位',
              align: 'center',
              width: 250,
              dataIndex: 'ownerUnitName',
              key: 'ownerUnitName1',
              ellipsis: true
            },
            { title: '收款单位',
              align: 'center',
              width: 250,
              dataIndex: 'signUnitName',
              key: 'signUnitName1',
              ellipsis: true
            },
            { title: '考核月份',
              align: 'center',
              width: 150,
              dataIndex: 'assessmentDate',
              ellipsis: true
            }
          ]
        }
      ],
      url: {
        queryProjectReportById: '/api/erp/project/report/erpProjectReport/queryById',
        list: '/api/erp/project/report/erpProjectContractTaskReport/list',
        exportXlsUrl: '/api/erp/project/report/erpProjectContractTaskReport/exportXls'
      }
    }
  },
  methods: {
    searchReset() {
      this.queryParam = {}
      this.projectEstablishDateRange = []
      this.loadData(1)
    },
    handleReset() {
        this.projectEstablishDateRange = [];
        this.allSearchReset();
      },
    handlePageChange(pageNo) {
      this.rowSpanPagination.pageNo = pageNo
      // this.selectedRowKeys=[]
      // this.selectionRows=[]
      this.loadData()
    },
    async loadData(arg) {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.rowSpanPagination.pageNo = 1;
      }
      var params = this.getQueryParams();//查询条件
      this.loading = true
      this.dataSource = []
      let res = await getAction(this.url.list, {
        ...params,
        pageNo: this.rowSpanPagination.pageNo
      })
      this.loading = false

      if (res.success) {
        this.dataSource =  res.result ? res.result.records : [];
        this.rowSpanPagination.totalPage = res.result? res.result.pages : 0
        this.rowSpanPagination.total = res.result? res.result.total : 0
        //判断是否当前页没有数据且不为第一页
        // if(this.dataSource.length==0&&this.rowSpanPagination.pageNo!=1){
        //   this.rowSpanPagination.pageNo=this.rowSpanPagination.pageNo-1
        //   this.loadData(this.rowSpanPagination.pageNo-1);
        // }

        // const data = [...this.dataSource];
        // if (this.queryParam.bizTaskType == '1') {
        //   for (var i = 0; i < data.length; i++) {
        //     //item.taskUrge = false;
        //     var item = data[i];
        //     var params = {flowCode: this.flowCode, dataId: item.id};//查询条件
        //     let res2 = await getAction(this.url.checkNotify, params);
        //     if (res2.result) {
        //       item.taskUrge = true;
        //     }
        //   }
        // }
        // this.dataSource = data;
      } else {
        this.dataSource = []
      }
      // this.bizCount();
    },
    onDetail(id) {
      const that = this
      this.$nextTick(() => {
        getAction(this.url.queryProjectReportById, { id }).then((res) => {
          if (res.success) {
            const model = res.result
            that.$refs.reportForm.getDetail(model);
            that.$refs.reportForm.title = '项目一览表';
          }
        })
      })
    },
    getContractDetail(record) {
      this.$nextTick(() => {
        this.$refs.reportForm.getContractDetail(record);
        this.$refs.reportForm.title = '项目一览表';
      })
    },
    getReimbursementDetail(record) {
      this.$refs.reimburForm.initData(record.id);
      this.$refs.reimburForm.visible = true;
    },

    tableChangePages(pagination, filters, sorter){

      this.rowSpanPagination = pagination
      this.rowSpanPagination.pageNo = pagination.current
      this.loadData()
    },
    customRow(record, index) {
      const rowSpan = this.getRowSpan(record.id, index, 'id', record.taskSize)
      return {
        rowspan: rowSpan
      }
    },
    customTaskRow(record, index) {
      const rowSpan = this.getRowSpan(record.taskId, index, 'taskId', record.paymentSize)
      return {
        rowspan: rowSpan
      }
    },
    getRowSpan(value, index, column, size) {
      if (size === 1 || size === null || size === undefined) {
        return 1
      } else {
        if (index === 0) {
          return size
        }
        // 对比下一个是否存在且相等，如果相等则合并单元格。
        for (let i = index - 1; i >= 0; i--) {
            if (this.dataSource[i][column] === value) {
            size = 0
            break
          }
        }
      }
      return size
    },
    businessCategoryHandle(obj) {
      if (obj) {
        this.queryParam.categoryCode = obj.categoryCode;
      }
    }
  }
}
</script>
